Fix sync.sh YAML dequoting and default TICKET_LABEL_CREATION_ALLOWED#69
Merged
Merged
Conversation
Member
Author
Review SummaryVerdict: APPROVE Findings
Both fixes are correctly scoped. The greedy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two sync bugs that caused rendered skill files to contain broken content for common configurations.
1. VERSION_READ_CMD rendered as an unterminated shell command.
parse_yaml_simpleused.strip('"').strip("'"), which greedily strips all trailing quote characters. For the default template value"node -p \"require('./package.json').version\""this producednode -p \"require('./package.json').version\— missing a closing quote, with a trailing backslash. Copy-paste into a shell failed.2.
{{TICKET_LABEL_CREATION_ALLOWED}}leaked through to rendered skill files. The start skill references this setting, but the default.codecannon.yamltemplate ships it commented out. Projects that configured a ticket-label pool without uncommenting the key ended up with raw mustache placeholders in the rendered start skill.Changes
_dequote()helper insync.shthat strips exactly one pair of matching outer quotes and decodes\"/\\in double-quoted values. Wired into the three value sites inparse_yaml_simpleandparse_frontmatter, plus the list-item sites.TICKET_LABEL_CREATION_ALLOWEDdefaults to"false"when absent from the project config, matching the documented default intemplates/codecannon.yamlanddocs/config-reference.md.No skill-file changes required — the placeholders already render correctly once the sync engine behaves.
Verification
./sync.sh --validatepasses../sync.sh --dry-runagainst this repo is a clean no-op (this repo usescat VERSIONand has all label keys set explicitly, so it's unaffected by either bug).templates/codecannon.yamlnow yieldsVERSION_READ_CMD = 'node -p "require(\'./package.json\').version"'with balanced quotes.Issue #68